public class SolutionLCP6 {
    public int minCount(int[] coins) {
        int ans=0;
        for (int coin : coins) {
            ans+=coin%2==0?coin/2:coin/2+1;
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println(new SolutionLCP6().minCount(new int[]{4,2,1}));
    }
}
